package com.mv.controller;

import com.mv.pojo.Consume;
import com.mv.service.ConsumeService;
import com.mv.vo.MovieRecord;
import com.mv.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("/mv")
public class ConsumeController {
    @Autowired
    private ConsumeService consumeService;
    @GetMapping("/consume/getConsumeList")
    public SysResult getConsumeList(){
        List<Consume> consumeList=consumeService.getConsumeList();
        return SysResult.success(consumeList);
    }
    @GetMapping("/consume/getMovieRecordList")
    public SysResult getMovieRecordList(){
        List<MovieRecord> movieRecordList=consumeService.getMovieRecordList();
        return SysResult.success(movieRecordList);
    }
}
